package com.onejson.ojmall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("product")
@ApiModel(description = "商品实体")
public class ProductEntity {
    
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("商品ID")
    private Long id;
    
    @ApiModelProperty("商品名称")
    private String name;
    
    @ApiModelProperty("商品描述")
    private String description;
    
    @ApiModelProperty("商品价格")
    private BigDecimal price;
    
    @ApiModelProperty("商品库存")
    private Integer stock;
    
    @ApiModelProperty("商品状态(0-下架，1-上架)")
    private Integer status;
    
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;
    
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;
} 